package org.ladybug.service.auth;

import org.ladybug.dao.persistence.Utente;
import org.ladybug.service.admin.AdminService;
import org.springframework.security.providers.dao.SaltSource;
import org.springframework.security.providers.encoding.PasswordEncoder;
import org.springframework.security.userdetails.UserDetails;

import test.AbstractLadybugTest;

public class LadyBugUserDetailsTest extends
		AbstractLadybugTest {
	AdminService adminService;
	HibernateAuthenticationService hibernateAuthenticationService;
	SaltSource saltSource ;
	PasswordEncoder passwordEncoder;
	public void testLadyBugUserDetails() {
		Utente u = new Utente();
		u.setNickname("edoardo");
		u.setPassword(passwordEncoder.encodePassword("edoardo", saltSource));
		UserDetails userDetails=hibernateAuthenticationService.loadUserByUsername("edoardo");
		
		
	}
	public AdminService getAdminService() {
		return adminService;
	}
	public void setAdminService(AdminService adminService) {
		this.adminService = adminService;
	}
	public SaltSource getSaltSource() {
		return saltSource;
	}
	public void setSaltSource(SaltSource saltSource) {
		this.saltSource = saltSource;
	}
	public PasswordEncoder getPasswordEncoder() {
		return passwordEncoder;
	}
	public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
		this.passwordEncoder = passwordEncoder;
	}
	public void setHibernateAuthenticationService(
			HibernateAuthenticationService hibernateAuthenticationService) {
		this.hibernateAuthenticationService = hibernateAuthenticationService;
	}

}
